/**
 * 页面主JS 依赖 CanvasCross模块
 */
define(['CanvasCross'], function(CanvasCross) {　

	var init = function() {
		var cross = new CanvasCross('#main', {
			compass: {
				size: 14,
				name: "北",
				top: 30,
				right: 50
			},
			vertical: {
				width: "110",
				name: "天智路",
				text: {
					top: 50,
					bottom: 80
				}
			},
			horizontal: {
				width: "140",
				name: "望江西路",
				text: {
					left: 130,
					right: 180
				}
			},
			radius: 50
		})

		var select = document.getElementById('direction');
		select.onchange = function() {
			if (this.value == 3) {
				cross.arrow('middle', 340, 235, 0.6, 0);
				//cross.arrow('middle', 660, 168, 0.6, 180);
			} else if (this.value == 1) {
				cross.arrow(340, 258, 0.6, 0);
				//cross.arrow('right', 660, 143, 0.6, 180);
			} else if (this.value == 2) {
				cross.arrow('left', 340, 215, 0.6, 0);
				//cross.arrow('left', 660, 188, 0.6, 180);
			}else if(this.value == 4){
				cross.arrow('middleLeft', 340, 215, 0.6, 0);
			}else if(this.value == 5){
				cross.arrow('middleRight', 460, 25, 0.6, 90);
			}
		}
	}
	return {
		init: init
	}
});